home *** CD-ROM | disk | FTP | other *** search
- // web2.pop
- // describes a form based on William Latham's "Web Forms"
- // extends upon web.pop by adding rotational commands to horn forms
- // extends upon web1.pop by adding vector-egg-scaling
-
- population 0
- dimensions = 1
- colour_model RGB
- render_quality flat
-
- genome 0 {
-
- // top level structure iterates in a circle, creating outward pointing spokes
- setScalarMem( 0, 5 : 3 : 10 ), // mem[0] = #spokes
- branchFor(
- getScalarMem(0),
- 1, // mem[1] = current spoke [ 0 ... #spokes-1]
-
- // inter-spoke code - rotates in a circle
- *join(
- swivelLeft( div(dtor(360), getScalarMem(0)) ),
- bankLeft( dtor(5:0:60) )
- ),
-
- // spoke code - creates a horn form jutting out at right angles to
- // main circle and then branches smaller sub-horns at right angles
- join(
- swivelRight( dtor(90) ),
-
- // major horn form
- *scope(
- eggScale( 1 : .5 : 1.5 ),
- repeat(
- 3 : 2 : 20,
- join(
- forward( .5 : 0.01 : 0.6 ),
- moveHue( .1 : -.2 : .2 ),
- bankLeft( dtor(5:0:30) ),
- eggVectorScale( <1,1,1> : <.5,.5,.5> : <1.5,1.5,1.5> ),
- lay
- )
- )
- ), // end major horn form
-
- // minor branches
- eggScale( 1 : .5 : 1.5 ),
- *repeat(
- 3 : 2 : 20,
-
- join(
- forward( .5 : 0.01 : 0.6 ),
- bankLeft( dtor(5:0:30) ),
-
- // minor horn-form
- *scope(
- swivelRight( dtor(90) ),
- scale( .5 : 0.1 : 1.3 ),
- repeat(
- 8 : 2 : 40,
- join(
- forward( .5 : 0.05 : 0.6 ),
- moveHue( .1 : -.2 : .2 ),
- bankLeft( dtor(5:0:30) ),
- eggVectorScale( <1,1,1> : <.5,.5,.5> : <1.5,1.5,1.5> ),
- lay
- )
- )
- ) // end minor horn form
- )
- ) // end minor branches
-
- ) // end spoke code
- ) // end web 'branchFor'
- }
-
- // eof : web2.pop
-